Class BaseIEmitter

java.lang.Object
particleengine.IEmitter
particleengine.BaseIEmitter

public abstract class BaseIEmitter extends IEmitter
Partial implementation of IEmitter that omits only the particle generation function. All other properties are set to default values and may be overwritten as required.
  • Constructor Details

    • BaseIEmitter

      public BaseIEmitter()
  • Method Details

    • getLayer

      public com.fs.starfarer.api.combat.CombatEngineLayers getLayer()
      Specified by:
      getLayer in class IEmitter
      Returns:
      Combat layer particles should be rendered on.
    • getCampaignLayer

      public com.fs.starfarer.api.campaign.CampaignEngineLayers getCampaignLayer()
      Specified by:
      getCampaignLayer in class IEmitter
      Returns:
      Campaign layer particles should be rendered on.
    • isAlwaysRenderInCampaign

      public boolean isAlwaysRenderInCampaign()
      Specified by:
      isAlwaysRenderInCampaign in class IEmitter
      Returns:
      Whether the particles should persist through campaign location transitions. Note that particle and emitter positions are world-space-relative, not screen-space-relative, so dynamic anchoring and changing emitters' positions in a CurrentLocationChangedListener is required to fix particles' screen-space positions.
    • getLocation

      public org.lwjgl.util.vector.Vector2f getLocation()
      Specified by:
      getLocation in class IEmitter
      Returns:
      Absolute location of this emitter, in world coordinates.
    • getSprite

      public com.fs.starfarer.api.graphics.SpriteAPI getSprite()
      Specified by:
      getSprite in class IEmitter
      Returns:
      Sprite that particles from this emitter will have. Can be null, in which a default particle will be used.
    • getXDir

      public float getXDir()
      Specified by:
      getXDir in class IEmitter
      Returns:
      Angle, in degrees, that this emitter's x-axis faces. If 0, then this emitter's axes coincides with global axes (x-axis facing to the right).
    • getBlendSourceFactor

      public int getBlendSourceFactor()
      Specified by:
      getBlendSourceFactor in class IEmitter
      Returns:
      Source blend factor, e.g. GL11.GL_SRC_ALPHA.
    • getBlendDestinationFactor

      public int getBlendDestinationFactor()
      Specified by:
      getBlendDestinationFactor in class IEmitter
      Returns:
      Destination blend factor, e.g. GL11.GL_ONE_MINUS_SRC_ALPHA.
    • getBlendFunc

      public int getBlendFunc()
      Specified by:
      getBlendFunc in class IEmitter
      Returns:
      Blending operation, e.g. GL14.GL_FUNC_ADD.
    • getRenderRadius

      public float getRenderRadius()
      Specified by:
      getRenderRadius in class IEmitter
      Returns:
      Distance from edge of screen beyond which particles are culled before generation. This applies to the emitter's location rather than individual particles' locations.